package bavaria.hightech.banking;

import java.util.Hashtable;

public class BankRegistry {
	
	private static BankRegistry instance = null;
	private Hashtable <String, B2B> registry;

	
	private BankRegistry(){
		registry = new Hashtable<String, B2B> ();
	}
	
	public static BankRegistry getInstance(){
		if(instance == null){
			instance = new BankRegistry();
			return instance;
		}
			
		else
			return instance;
	}
	
	public void bind(String name, B2B bank){
		registry.put(name, bank);
	}
	
	public B2B lookup(String name){
		return registry.get(name);
	}
}
